package com.oa.android.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.oa.android.R;

import butterknife.ButterKnife;
import butterknife.InjectView;


/**
 * 文件管理
 *
 * @author -zouqh
 */
public class FileMangeActivity extends Activity implements OnClickListener {


    @InjectView(R.id.close)
    ImageView close;
    @InjectView(R.id.title_text)
    TextView titleText;
    @InjectView(R.id.ritgh_icon)
    ImageView ritghIcon;
    @InjectView(R.id.ritgh_text)
    TextView ritghText;
    @InjectView(R.id.layout1)
    LinearLayout layout1;
    @InjectView(R.id.layout2)
    LinearLayout layout2;
    @InjectView(R.id.layout3)
    LinearLayout layout3;
    @InjectView(R.id.layout4)
    LinearLayout layout4;
    @InjectView(R.id.layout5)
    LinearLayout layout5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.file_mange_activity);
        ButterKnife.inject(this);
        titleText.setText("文档管理");
        close.setOnClickListener(this);
        layout1.setOnClickListener(this);
        layout2.setOnClickListener(this);
        layout3.setOnClickListener(this);
        layout4.setOnClickListener(this);
        layout5.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub

        Intent intent=new Intent(this,FileDirActivity.class);
        switch (v.getId()) {
            case R.id.close:
                finish();
                break;
            case R.id.layout1:
                intent.putExtra("name","个人文件");
                intent.putExtra("fileType","个人文件");
                intent.putExtra("dri","0");
                intent.putExtra("type","1");
                startActivity(intent);
                break;
            case R.id.layout2:
                intent.putExtra("name","单位文件");
                intent.putExtra("fileType","单位文件");
                intent.putExtra("dri","0");
                intent.putExtra("type","0");
                startActivity(intent);
                break;
            case R.id.layout3:
                intent.putExtra("name","共享文件");
                intent.putExtra("dri","0");
                intent.putExtra("fileType","共享文件");
                intent.putExtra("type","2");
                startActivity(intent);
                break;
            case R.id.layout4:
                intent.putExtra("name","我的硬盘");
                intent.putExtra("dri","0");
                intent.putExtra("fileType","我的硬盘");
                startActivity(intent);
                break;
            case R.id.layout5:
                intent.putExtra("name","共享硬盘");
                intent.putExtra("dri","0");
                intent.putExtra("fileType","共享硬盘");
                startActivity(intent);
                break;

            default:
                break;
        }
    }


}
